﻿@{
    Layout = null;
}
<h2>千百意花卉后台管理</h2>
<script src="~/lib/jquery/1.9.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="~/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="~/static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" />
    <link href="~/static/h-ui.admin/css/style.css" rel="stylesheet" />
    <link href="~/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" />
    <title>千百意花卉后台管理</title>
</head>
<body>
    <div class="loginWraper">
        <h2 style="text-align:center;margin-top:30px;">千百意花卉后台管理登录页面</h2>
        <div id="loginform" class="loginBox">
            <form class="form form-horizontal" action="index.html" method="post">
                <div class="row cl">
                    <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
                    <div class="formControls col-xs-8">
                        <input id="Name" name="name" type="text" placeholder="用户名" class="input-text size-L">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
                    <div class="formControls col-xs-8">
                        <input id="Pwd" name="pwd" type="password" placeholder="密码" class="input-text size-L">
                    </div>
                </div>
                <div class="row cl">
                    <div class="formControls col-xs-8 col-xs-offset-3">
                        <input id="yzm" class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">
                        <img src="~/validte.ashx" style="height:40px;width:80px;" onclick="this.src = '/validte.ashx?d='+new Date()"> <a id="kanbuq" href="">看不清，换一张</a>
                    </div>
                </div>
                <div class="row cl">
                    <div class="formControls col-xs-8 col-xs-offset-3">

                    </div>
                </div>
                <div class="row cl">
                    <div class="formControls col-xs-8 col-xs-offset-3">
                        <input name="" type="button" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;" onclick="login()">
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <input name="" type="button" class="btn btn-success radius size-L" value="&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;册&nbsp;" onclick="login()">
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
    <!--此乃百度统计代码，请自行删除-->
    <script>
        function login() {
            var name = $("#Name").val();
            var pwd = $("#Pwd").val();
            var yzm = $("#yzm").val();

            $.ajax({
                type: "post",
                url: "/Admin/LoginDo",
                data: { name: name, pwd: pwd, yzm: yzm},
                success: function (obj) {
                    if (obj == 2) {
                        alert("验证码不正确");
                        return;
                    }
                    if (obj > 0) {
                        location.href = '/Admin/Index'
                    } else {
                        alert("登录失败");
                        location.reload();
                    }
                }
            })
        }
    </script>
</body>
</html>

